package com.itcam.lease.common.exception;


import com.itcam.lease.common.result.ResultCodeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;

@Data
public class LeaseException extends RuntimeException{

    private Integer code;

    public LeaseException(ResultCodeEnum codeEnum) {
        super(codeEnum.getMessage());
        code=codeEnum.getCode();
    }

    public LeaseException(String message, Integer code) {
        super(message);
        this.code = code;
    }

}
